# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.DiagnoseClusterRequest do
  @moduledoc """
  A request to collect cluster diagnostic information.

  ## Attributes

  *   `diagnosisInterval` (*type:* `GoogleApi.Dataproc.V1.Model.Interval.t`, *default:* `nil`) - Optional. Time interval in which diagnosis should be carried out on the cluster.
  *   `job` (*type:* `String.t`, *default:* `nil`) - Optional. DEPRECATED Specifies the job on which diagnosis is to be performed. Format: projects/{project}/regions/{region}/jobs/{job}
  *   `jobs` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies a list of jobs on which diagnosis is to be performed. Format: projects/{project}/regions/{region}/jobs/{job}
  *   `tarballAccess` (*type:* `String.t`, *default:* `nil`) - Optional. (Optional) The access type to the diagnostic tarball. If not specified, falls back to default access of the bucket
  *   `tarballGcsDir` (*type:* `String.t`, *default:* `nil`) - Optional. (Optional) The output Cloud Storage directory for the diagnostic tarball. If not specified, a task-specific directory in the cluster's staging bucket will be used.
  *   `yarnApplicationId` (*type:* `String.t`, *default:* `nil`) - Optional. DEPRECATED Specifies the yarn application on which diagnosis is to be performed.
  *   `yarnApplicationIds` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies a list of yarn applications on which diagnosis is to be performed.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :diagnosisInterval => GoogleApi.Dataproc.V1.Model.Interval.t() | nil,
          :job => String.t() | nil,
          :jobs => list(String.t()) | nil,
          :tarballAccess => String.t() | nil,
          :tarballGcsDir => String.t() | nil,
          :yarnApplicationId => String.t() | nil,
          :yarnApplicationIds => list(String.t()) | nil
        }

  field(:diagnosisInterval, as: GoogleApi.Dataproc.V1.Model.Interval)
  field(:job)
  field(:jobs, type: :list)
  field(:tarballAccess)
  field(:tarballGcsDir)
  field(:yarnApplicationId)
  field(:yarnApplicationIds, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.DiagnoseClusterRequest do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.DiagnoseClusterRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.DiagnoseClusterRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
